<template>
  <div>
    <div style="height: 10%; overflow: auto;">
      <h3>Custom path</h3>
      Marker icon are retrived from {{ path }} custom path
    </div>
    <l-map
      :zoom="zoom"
      :center="center"
      style="height: 90%">
      <l-tile-layer
        :url="url"
        :attribution="attribution"/>
      <l-marker :lat-lng="marker"/>
      <l-icon-default :image-path="path"/>
    </l-map>
  </div>
</template>

<script>
import { LMap, LTileLayer, LMarker, LIconDefault } from 'vue2-leaflet';

export default {
  name: 'CustomPath',
  components: {
    LMap,
    LTileLayer,
    LMarker,
    LIconDefault
  },
  data () {
    return {
      zoom: 13,
      path: '/images/',
      center: [47.413220, -1.219482],
      url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
      attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
      marker: L.latLng(47.413220, -1.219482)
    };
  }
};
</script>
